package com.example.hellomap.rest;

import junit.framework.TestCase;

import org.junit.Test;

public class test_calendars extends TestCase {
	//GET
	/*@Test
	public void test_calendars_normal_get() {
		ServerInterface.get("calendars");
		ServerInterface.get("calendars/Akos"); //uid alapján kérdezzük le
	}
	
	@Test
	public void test_calendars_caseInsensitive_get() {
		ServerInterface.get("calendars/akos");
		ServerInterface.get("calendars/dORKa");
	}
	
	@Test
	public void test_calendars_doesNotExist_get() {
		ServerInterface.get("calendars/elemerce");
	}
	
	//POST
	@Test
	public void test_calendars_normal_post() {
		calendars calendar = new calendars("Szabi", "2014-08-22T22:00:00.000Z", "2014-08-22T23:00:00.000Z", "reggae buli", 47.333, 19.123);
		ServerInterface.post("calendars", calendar);
		ServerInterface.get("calendars");
	}
	
	public void test_calendars_DoesNotHaveCoordError() {
		calendars calendar2 = new calendars();
		calendar2.setUserId("Bill");
		ServerInterface.post("calendars", calendar2);
		ServerInterface.get("calendars");
	}
	
		
	@Test
	public void test_calendars_NotExistingIdPostError() {
		calendars calendar = new calendars();
		calendar.setLat(30.1);	//Ezt ki kell tölteni, különben erre dobná az errort
		calendar.setLon(11.3);
		ServerInterface.post("calendars", calendar);
		ServerInterface.get("calendars");
	}
	
	@Test
	public void test_calendars_NotValidCoordinatesError() {
		calendars calendar = new calendars("Szabi", "2014-08-22T22:00:00.000Z", "2014-08-22T23:00:00.000Z", "hiba", 470.333, -400.123);
		ServerInterface.post("calendars", calendar);
	}

	//DELETE
	@Test
	public void test_calendars_normal_delete() {
		ServerInterface.delete("calendars", "Szabi");
	}
	
	public void test_calendars_DoesNotExist_delete() {
		ServerInterface.delete("calendars", "Geza");
	}
*/
	//PUT
	public void test_users_normal_putPass() {
		ServerInterface.updateUser("Szabi", "ororszlan", "pass");
	}
	public void test_users_normal_addEvent() {
		ServerInterface.updateUser("Dorka", "ujesemeny", "event_id");
	}
/*
	public void test_users_normal_putEvent() {
		ServerInterface.updateUser("Dorka", "nana", "public_events");
	}

	*/
}
